package com.gupaoedu.pattern.observer.guava;

import com.google.common.eventbus.EventBus;
import com.gupaoedu.pattern.observer.gper.Question;

/**
 * 2019/9/28
 * created by chenpp
 */
public class GuavaGPerTest {

    public static void main(String[] args) {

        EventBus eventBus = new EventBus();

        Question question = new Question();
        question.setName("chenpp");
        question.setContent("spring的源码怎么阅读");

        eventBus.register(new GuavaTeacher("li"));
        eventBus.register(new GuavaTeacher("Ming"));

        //发布消息
        eventBus.post(question);
    }
}
